using System;
using System.Collections.Generic;
using System.Text;

namespace LenninSoftware.FormEditor
{
    [Serializable]
    public class PropertyBag
    {
        private Dictionary<string, object> _items;

        public PropertyBag()
        {
           _items = new Dictionary<string, object>();
        }

        public Dictionary<string, object>.KeyCollection Keys
        {
            get
            {
                return _items.Keys;
            }
        }

        public object this[string name]
        {
            get
            {
                if (_items.ContainsKey(name))
                    return _items[name];

                return null;
            }
            set
            {
                _items[name] = value;
            }
        }
    }
}
